<link type="text/css" href="/admins/js/pagerView/pager-view.css" rel="stylesheet" />
<link type="text/css" href="/admins/js/jquery/css/ui-lightness/jquery-ui-1.8.20.custom.css" rel="stylesheet" />
<script type="text/javascript" src="/admins/js/jquery/jquery-ui-1.8.20.custom.min.js"></script>
<script type="text/javascript" src="/admins/js/jquery/jquery.ui.datepicker-zh-CN.js"></script>
<script type="text/javascript" src="/admins/js/pagerView/pager-view.js"></script>
<script type="text/javascript">
    $(function(){
    
        $.datepicker.setDefaults( $.datepicker.regional[ "zh-CN" ] );
        $( "#form1 #dateinbegin" ).datepicker({
            changeMonth: true,
            changeYear: true
        });
        $( "#form1 #dateinend" ).datepicker({
            changeMonth: true,
            changeYear: true
        });
    });
</script>
<style>
    #sel * {
        padding: 2px;
    }
    .status_2,.status_14 {
        color: #c00;
    }
    .status_3 {
        color: blue;
    }
    .status_4 {
        color: #f60;
    }
</style>
<form action="/admini/manageadmin/servicelog/" method="get" style="margin:0px" id="form1">
    <div style=" border:1px solid #DDDDDD; padding:5px; margin:20px 15px;" id='sel'>
        <label for="member">快速搜索：</label><input type="text" id="quick" name="quick" value="<?php echo $this->quick; ?>" />
        <label for="first">内容类型：</label>
            <select id="firstType" name="firstType">
                <option value="" <?php echo $this->firstType == ""?"selected":"";?>>不限</option>
                <?php foreach ($this->firstTypeAll as $key => $firstTypeVal) { ?>
                    <option value="<?php echo $key;?>" <?php echo $key==$this->firstType?"selected":"";?>><?php echo $firstTypeVal;?></option>
                <?php }?>
            </select>
        <label for="function">功能类型：</label>
            <select id="functionType" name="functionType">
                    <option value="" <?php echo $this->functionType == ""?"selected":"";?>>不限</option>
                <?php foreach ($this->functionTypeAll as $key => $functionTypeVal) { ?>
                    <option value="<?php echo $key;?>" <?php echo $key==$this->functionType?"selected":"";?>><?php echo $functionTypeVal;?></option>
                <?php }?>
            </select>
        <label for="urgency">紧急类型：</label>
            <select id="urgencyType" name="urgencyType">
                    <option value="" <?php echo $this->urgencyType == ""?"selected":"";?>>不限</option>
                <?php foreach ($this->urgencyTypeAll as $key => $urgencyTypeVal) { ?>
                    <option value="<?php echo $key;?>" <?php echo ($key==$this->urgencyType && $this->urgencyType !== "")?"selected":"";?>><?php echo $urgencyTypeVal;?></option>
                <?php }?>
            </select>
        <label for="status">状态：</label>
            <select id="status" name="status">
                    <option value="" <?php echo $this->status == ""?"selected":"";?>>不限</option>
                <?php foreach ($this->statusAll as $key => $statusVal) { ?>
                    <option value="<?php echo $key;?>" <?php echo $key==$this->status?"selected":"";?>><?php echo $statusVal;?></option>
                <?php }?>
            </select>
        <label for="starttime">发布时间：</label><input type="text" id="dateinbegin" name="dateinbegin" value="<?php echo $this->dateinbegin; ?>" />
        <label for="endtime">--</label><input type="text" id="dateinend" name="dateinend" value="<?php echo $this->dateinend; ?>" />
        <input type="submit" id="queryButton" value="查询"/>
    </div>
</form>
    <div class="dataTable">
        <table>  
            <tfoot>
             <tr><td colspan="14"><button class="button" id="addlog-button" style="background-color: #1668A4;width: 80px;height: 30px;color: white;font-size: 14px;border-radius:8px;">添加记录</button></td></tr>
            </tfoot>
            <tr>
                <th class="w1" width="5%">客户名称</th>
                <th class="w2" width="5%">仓库号</th>
                <th class="w3" width="5%">QQ</th>
                <th class="w2" width="20%">内容摘要</th>	
                <th class="w3" width="10%">接待客服</th>	
                <th class="w4" width="5%">内容类型</th>	
                <th class="w5" width="5%">功能类型</th>
                <th class="w6" width="5%">紧急类型</th>
                <th class="w7" width="10%">创建时间</th>
            </tr>  
        
            <?php if($this->servicelist != ''){
                foreach ($this->servicelist as $Item) { ?> 
                <tr>
                    <td class="w1" nowrap align="center"><?php echo $Item->UserName; ?></td>
                    <td class="w2" nowrap align="center"><?php echo $Item->StoreNo=="暂无"?$Item->StoreNo:'<a href="/admini/managestore/index/?quick='.$Item->StoreNo.'" class="indexa" target="_blank">'.$Item->StoreNo.'</a>'; ?></td>
                    <td class="w3" nowrap align="center"><?php echo $Item->Qq; ?></td>
                    <td class="w2" nowrap><a href="/admini/manageadmin/servicedetail/id/<?php echo $Item->Id;?>" class="indexa">
                        <?php echo mb_strlen($Item->Content, 'utf-8') > 40 ? (mb_substr($Item->Content, 0, 40, 'utf-8') . '......') : $Item->Content;?></a></td>
                    <td class="w3" nowrap align="center"><?php echo $Item->SerName; ?></td>
                    <td class="w4" nowrap align="center"><?php echo $Item->FirstTypeName; ?></td>
                    <td class="w5" nowrap align="center"><?php echo $Item->FunctionTypeName;?></td>
                    <td class="w6" nowrap align="center"><?php echo $Item->UrgencyTypeName;?></td>
                    <td class="w7" nowrap align="center"><?php echo $Item->DateCreated;?></td>
                 </tr>         
            <?php } }?>
        </table>
    </div>                
    <div class="toolbar">
        <?php echo $this->partial('paging.phtml', array("pages" => $this->serviceall,"pamas"=>"quick=".$this->quick."&firstType=$this->firstType&functionType=$this->functionType&urgencyType=$this->urgencyType&status=$this->status&dateinbegin=$this->dateinbegin&dateinend=$this->dateinend")); ?>
    </div>   
<script type="text/javascript">
    $("#addlog-button").click(function(){
       location.href='/admini/manageadmin/addserlog/'; 
    });
</script>